package com.lanou.service;/*
 * @author 马继耿~
 * @date 2023/10/24 15:22
 * @version 1.0
 * */

import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.lanou.mapper.MJG_SelectShopIdMapper;
import com.lanou.mapper.MJG_SelectYuCunMapper;
import com.lanou.pojo.PaymentBillEntity;
import com.lanou.pojo.PaymentPreEntity;
import com.lanou.service.MJG_SelectShopIdServicce;
import com.lanou.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

@Service
public class MJG_SelectShopIdServiceImpl implements MJG_SelectShopIdServicce {
    @Autowired
    public MJG_SelectShopIdMapper mjg_selectShopIdMapper;

    @Override
    public JsonResult SelectShopId(String resourceName) throws ParseException{
        List<PaymentBillEntity> paymentBillEntities = mjg_selectShopIdMapper.SelectShopId(resourceName);
        PageInfo<PaymentBillEntity> paymentBillEntityPageInfo = new PageInfo<>(paymentBillEntities);
        JsonResult jsonResult = new JsonResult();
        jsonResult.setData(paymentBillEntityPageInfo);
        jsonResult.setStatus(200);
        return jsonResult;
    }
    @Autowired
    private MJG_SelectYuCunMapper mjg_selectYuCunMapper;
    @Override
    public JsonResult SelectYuCun(String resourceName) {
        List<PaymentPreEntity> paymentBillEntities = mjg_selectYuCunMapper.SelectYuCun(resourceName);
        PageInfo<PaymentPreEntity> paymentPreEntityPageInfo = new PageInfo<>(paymentBillEntities);
        JsonResult jsonResult = new JsonResult();
        jsonResult.setData(paymentPreEntityPageInfo);
        jsonResult.setStatus(200);
        return jsonResult;
    }
}